<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePrizeTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('prize', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->nullable()->comment('奖品名字');
            $table->string('img')->nullable()->comment('奖品图片');
            $table->integer('sum')->default('0')->comment('奖品总数量');
            $table->integer('winners_num')->default('0')->comment('中奖数量');
            $table->integer('probability')->default('0')->comment('概率');
            $table->integer('type')->default('0')->comment('1抽奖卷2皮肤碎片3改名卡4铭文5砖石6皮肤7优惠卷8小黑砖9镭射包');
            $table->string('code')->nullable()->comment('兑换码');
            $table->integer('status')->default('0')->comment('1道具2优惠卷3实物');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('prize');
    }
}
